<template>
  <van-tabs>
    <van-tab :title="title">
      <div class="panel">
        <slot></slot>
      </div>
    </van-tab>
  </van-tabs>
</template>

<script lang="ts">
import { Tabs, Tab } from 'vant'
export default {
  name: 'Panel',
  props: {
    title: {
      type: String,
      default: '系统提示',
    },
  },
  components: {
    [Tabs.name]: Tabs,
    [Tab.name]: Tab,
  },
  inject: {
    componentConfig: {
      from: 'componentConfig',
      default() {
        return {}
      },
    },
  },
}
</script>

<style scoped lang="scss">
.panel {
  padding: 10px;
  height: 60vh;
  overflow-y: scroll;
}
</style>
